@extends('admin.layout.index')

@section('content')
<!-- 显示错误 -->
@if (count($errors) > 0)
    <div class="mws-form-message warning">
        验证失败
        <ul>
            @foreach ($errors->all() as $error)
                <li>{{ $error }}</li>
            @endforeach
        </ul>
    </div>
@endif

<div class="mws-panel grid_8">
    <div class="mws-panel-header">
        <span>{{ $title }}</span>
    </div>
    <div class="mws-panel-body no-padding">
        <form class="mws-form" action="/admin/link/{{$data['id']}}" method="post" enctype="multipart/form-data">
            {{ csrf_field() }}
            <input type="hidden" value="PUT" name="_method">
            <div class="mws-form-inline">
                <div class="mws-form-row">
                    <label class="mws-form-label">友情链接的名字</label>
                    <div class="mws-form-item">
                        <input type="text" class="small" name="linkname" value="{{$data['linkname']}}" readonly>
                    </div>
                </div>
                <div class="mws-form-row">
                    <label class="mws-form-label">网址</label>
                    <div class="mws-form-item">
                        <input type="text" class="small" name="address" value="{{$data['address']}}">
                    </div>
                </div>
                <div class="mws-form-row">
                    <label class="mws-form-label">Logo</label>
                    <div class="mws-form-item">
                        
                        <input type="file" class="small" name="logo" >
                    </div>
                </div>
            </div>
            <div class="mws-button-row">
                <input type="submit" value="修改" class="btn btn-danger">
                <input type="reset" value="重置" class="btn ">
            </div>
        </form>
    </div>      
</div>
@endsection